import axios from '_l/api.request'

/**
 * 添加
 * @param oaLeave
 * @returns {ClientHttp2Stream | * | AxiosPromise<any> | ClientRequest | void}
 */
export const addOaLeave = (oaLeave) => {
  return axios.request({
    url: '/oaLeave/save',
    method: 'post',
    data: oaLeave
  })
}

/**
 * 修改
 * @param oaLeave
 * @returns {ClientHttp2Stream | * | AxiosPromise<any> | ClientRequest | void}
 */
export const updateOaLeave = (oaLeave) => {
  return axios.request({
    url: '/oaLeave/update',
    method: 'post',
    data: oaLeave
  })
}

/**
 * 删除
 * @param id
 * @returns {ClientHttp2Stream | * | AxiosPromise<any> | ClientRequest | void}
 */
export const deleteOaLeaveById = (id) => {
  return axios.request({
    url: '/oaLeave/delete',
    method: 'post',
    params: {
      id: id
    }
  })
}

/**
 * 批量删除
 * @param ids
 * @returns {ClientHttp2Stream | * | AxiosPromise<any> | ClientRequest | void}
 */
export const deleteBatchOaLeaveById = (ids) => {
  return axios.request({
    url: '/oaLeave/deleteBatch',
    method: 'post',
    data: ids
  })
}
